const ListReducer=(prevState={
    list:[],
    isList:false
},action={})=>{
    let newState={...prevState}
    switch(action.type){
        case 'get-list':
            newState.list=action.value
            return newState;
        case 'handle-showList':
            newState.isList=true
            return newState; 
        case 'handle-hideList':
            newState.isList=false
            return newState; 
        default:return prevState
    }
}

export default ListReducer